package com.example.app03.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.example.app03.bean.Artical;
import com.example.app03.dao.ArticalDao;
import com.example.app03.service.IArticalService;


@Service
public class ArticalServiceImpl implements IArticalService{
	@Autowired
	private ArticalDao articalDao;
	
	@Override
	public void save(Artical artical) {
		articalDao.save(artical);
	
	}
	
	@Override
	public List<Artical> findAll(){
		return articalDao.selectAll();
	}
	
	@Override
	public Artical findById(long id) {
		return articalDao.selectById(id);
	}

	@Override
	public void deleteById(long id) {
		articalDao.deleteById(id);
		// TODO Auto-generated method stub
		
	}
	
	
}
